import allure


@allure.epic("苏雨的小记")
@allure.feature("用户模块")
@allure.story("注册")
class TestRegister:
    @allure.title("注册失败")
    @allure.severity("critical")
    @allure.description("desc - 注册失败")
    def test_reg_fail(self):
        with allure.step("步骤1：打开注册页面"):
            print("打开注册页面")
            allure.attach("文本信息",
                          name="文本",
                          attachment_type=allure.attachment_type.TEXT)
        with allure.step("步骤2：输入注册信息"):
            print("输入注册信息")
            allure.attach(
                '<div class="wx"><img src="https://files-cdn.cnblogs.com/files/uncleyong/wx.bmp" alt="微信：ren168632201"></div>',
                name="html",
                attachment_type=allure.attachment_type.HTML)
        with allure.step("步骤3：提交注册，注册失败"):
            print("提交注册，注册失败")
            allure.attach.file("D:\\picture\\demo.jpg",
                               name="这是图片",
                               attachment_type=allure.attachment_type.JPG,
                               extension="jpg")
            assert 1 == 1
